/*
* Copyright (c) 2011 Connection Road.  All rights reserved.
* This program and the accompanying material are made available
* under the terms of the Eclipse Public Licnese v1.0 which is
* available at http://www.eclipse.org/legal/epl-v10.html
*/

using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using CrSyncFilesForms.Properties;
using CrSyncFilesForms.Utils;

namespace CrSyncFilesForms
{
    public partial class CrSyncUiExceptionDialog : Form
    {
        public CrSyncUiExceptionDialog()
        {
            InitializeComponent();
            AcceptButton = ButtonClose;
            CancelButton = ButtonClose;
        }

        private void CrSyncUiExceptionDialogLoad(object sender, System.EventArgs e)
        {
            MaximumSize = new Size(512, 322);
            MinimumSize = new Size(512, 322);
        }

        private void LinkCrSyncFilesHelpClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start(Settings.Default.CFG_URL_ONLINE_DOC);
        }

        private void LinkLabelHomePageClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start(Settings.Default.CFG_URL_HOME_PAGE);
        }

        private void ButtonCloseClick(object sender, System.EventArgs e)
        {
            Close();
        }

        private void LinkExecutionLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var dlg = new CrSyncUiLogViewer(ApplicationGlobals.CrSyncLogFilePath, Resources.TITLE_EXECUTION_LOG);
            dlg.ShowDialog(this);
        }

        private void LinkCriticalLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var dlg = new CrSyncUiLogViewer(ApplicationGlobals.CrSyncCriticalLogFilePath, Resources.TITLE_CRITICAL_LOG);
            dlg.ShowDialog(this);
        }

        private void CallBackSendLog(object sender, LinkLabelLinkClickedEventArgs e)
        {
            //TODO
        }

        


    }
}
